import request from '@/utils/request'



export function getEmployees(cmpId, pageIndex, pageSize, keyword, token, empId) {
  return request({
    url: '/api/Platform/CompanyManage/GetEmployees',
    method: 'get',
    params: {
      cmpId, pageIndex, pageSize, keyword, token, empId
    }
  })
}

export function GetSurveyProjects(pageIndex, pageSize, name) {
  return request({
    url: '/api/project/survey/GetSurveyProjects',
    method: 'get',
    params: {
      pageIndex, pageSize, name
    }
  })
}

export function GetSurveyProject(id) {
  return request({
    url: '/api/project/survey/GetSurveyProject',
    method: 'get',
    params: {
      id
    }
  })
}

export function AddSurveyProject(data) {
  return request({
    url: '/api/project/survey/AddSurveyProject',
    method: 'post',
    data
  })
}
export function UpdateSurveyProject(data) {
  return request({
    url: '/api/project/survey/UpdateSurveyProject',
    method: 'post',
    data
  })
}

export function DeleteSurveyProject(id) {
  return request({
    url: '/api/project/Survey/DeleteSurveyProject',
    method: 'get',
    params: {
      id
    }
  })
}
export function AddSurveyRecord(data) {
  return request({
    url: '/api/project/survey/AddSurveyRecord',
    method: 'post',
    data
  })
}
export function AddSurveyAudit(data) {
  return request({
    url: '/api/project/survey/AddSurveyAudit',
    method: 'post',
    data
  })
}
export function AuditSurvey(surveyId, type, isPass, remark) {
  return request({
    url: '/api/project/survey/AuditSurvey',
    method: 'get',
    params: {
      surveyId, type, isPass, remark
    }
  })
}
export function GetSurveyAudits(surveyId) {
  return request({
    url: '/api/project/survey/GetSurveyAudits',
    method: 'get',
    params: {
      surveyId
    }
  })
}
export function AddSurveyImage(data) {
  return request({
    url: '/api/project/survey/AddSurveyImage',
    method: 'post',
    data
  })
}
export function AddRemoteSurveyImage(data) {
  return request({
    url: '/api/project/survey/AddRemoteSurveyImage',
    method: 'post',
    data
  })
}
export function AddSurveyImages(data) {
  return request({
    url: '/api/project/survey/AddSurveyImages',
    method: 'post',
    data
  })
}

export function GetSurveyRecords(stepType, surveyId) {
  return request({
    url: '/api/project/survey/GetSurveyRecords',
    method: 'get',
    params: {
      stepType,
      surveyId
    }
  })
}

export function DeleteSurveyRecord(surveyRecordId) {
  return request({
    url: '/api/project/survey/DeleteSurveyRecord',
    method: 'get',
    params: {
      surveyRecordId
    }
  })
}

export function GetSurveyMap(prjId) {
  return request({
    url: '/api/project/survey/GetSurveyMap',
    method: 'get',
    params: {
      prjId
    }
  })
}

export function GetSurveyNames(prjId, name) {
  return request({
    url: '/api/project/survey/GetSurveyNames',
    method: 'get',
    params: {
      prjId, name
    }
  })
}

export function SetSurveyPosition(id, lat, lng) {
  return request({
    url: '/api/project/survey/SetSurveyPosition',
    method: 'get',
    params: {
      id, lat, lng
    }
  })
}

export function GetSurveyProjectsByUser() {
  return request({
    url: '/api/Project/Survey/GetSurveyProjectsByUser',
    method: 'get',
    params: {}
  })
}

export function GetSurveysByUser(pageIndex, pageSize, isDone, name) {
  return request({
    url: '/api/project/survey/GetSurveysByUser',
    method: 'get',
    params: {
      pageIndex, pageSize, isDone, name
    }
  })
}

export function GetSurveyImages(stepType, surveyId) {
  return request({
    url: '/api/project/survey/GetSurveyImages',
    method: 'get',
    params: {
      stepType, surveyId
    }
  })
}


export function AddSurvey(data) {
  return request({
    url: '/api/project/survey/AddSurvey',
    method: 'post',
    data
  })
}

export function ModifySurvey(data) {
  return request({
    url: '/api/project/survey/ModifySurvey',
    method: 'post',
    data
  })
}
export function SurveyModifyDone(id) {
  return request({
    url: '/api/project/survey/SurveyModifyDone',
    method: 'Get',
    params: {
      id
    }
  })
}
export function GetSurveyListByUser() {
  return request({
    url: '/api/project/survey/GetSurveyListByUser',
    method: 'get',
    params: {
    }
  })
}
export function GetSurveyListPageByUser(prjId, count, userId, pageIndex, pageSize, name) {
  return request({
    url: '/api/project/survey/GetSurveyListPageByUser',
    method: 'get',
    params: {
      prjId, count, userId, pageIndex, pageSize, name
    }
  })
}
export function GetSurveyList(prjId, stepId) {
  return request({
    url: '/api/project/survey/GetSurveyList',
    method: 'get',
    params: {
      prjId, stepId
    }
  })
}
export function GetSurveyMapList() {
  return request({
    url: '/api/project/survey/GetSurveyMapList',
    method: 'get',
    params: {}
  })
}
export function DeleteSurveyList(id) {
  return request({
    url: '/api/project/survey/RemoveSurveyList',
    method: 'get',
    params: {
      id
    }
  })
}
export function GetSurveys(prjId, stepId, name, pageIndex, pageSize, isInfoAudit, isPlaneAudit, isSurveyAudit) {
  return request({
    url: '/api/project/survey/GetSurveys',
    method: 'get',
    params: {
      prjId, stepId, name, pageIndex, pageSize, isInfoAudit, isPlaneAudit, isSurveyAudit
    }
  })
}

export function GetSurveyListMap(prjId, stepId, name, pageIndex, pageSize, isInfoAudit, isPlaneAudit, isSurveyAudit, opId) {
  return request({
    url: '/api/project/survey/GetSurveyListMap',
    method: 'get',
    params: {
      prjId, stepId, name, pageIndex, pageSize, isInfoAudit, isPlaneAudit, isSurveyAudit, opId
    }
  })
}
export function GetSurvey(id) {
  return request({
    url: '/api/project/survey/GetSurvey',
    method: 'get',
    params: {
      id
    }
  })
}

export function UploadBase64Image(data) {
  return request({
    url: '/api/project/survey/UploadBase64Image',
    method: 'post',
    data
  })
}

export function GetSurveyPlaneImages(surveyId) {
  return request({
    url: '/api/project/survey/GetSurveyPlaneImages',
    method: 'get',
    params: {
      surveyId
    }
  })
}

export function CommitSurveyAudit(surveyId) {
  return request({
    url: '/api/project/survey/CommitSurveyAudit',
    method: 'get',
    params: {
      surveyId
    }
  })
}

export function GetIDCardImages(surveyId) {
  return request({
    url: '/api/project/survey/GetIDCardImages',
    method: 'get',
    params: {
      surveyId
    }
  })
}

export function GetSurveyStatistics(prjId) {
  return request({
    url: '/api/Survey/GetSurveyStatistics',
    method: 'get',
    params: {
      prjId
    }
  })
}
export function GetLogByUser(prjId, stepId) {
  return request({
    url: '/api/Project/SurveyStatistics/GetLogByUser',
    method: 'get',
    params: {
      prjId, stepId
    }
  })
}

export function SetSurveyStepInfo(data) {
  return request({
    url: '/api/project/survey/SetSurveyStepInfo',
    method: 'post',
    data
  })
}

export function GetSurveyStepInfo(stepId, surveyId) {
  return request({
    url: '/api/project/survey/GetSurveyStepInfo',
    method: 'get',
    params: {
      stepId, surveyId
    }
  })
}

export function SetSurveyStepDone(surveyId, stepId) {
  return request({
    url: '/api/project/survey/SetSurveyStepDone',
    method: 'get',
    params: {
      surveyId, stepId
    }
  })
}

export function SetSurveyStepUnDone(surveyId, stepId) {
  return request({
    url: '/api/project/survey/SetSurveyStepUnDone',
    method: 'get',
    params: {
      surveyId, stepId
    }
  })
}

export function SetSurveyListDone(surveyListMapID, stepId) {
  return request({
    url: '/api/project/survey/SetSurveyListDone',
    method: 'get',
    params: {
      surveyListMapID, stepId
    }
  })
}

export function SetSurveyListUnDone(surveyListMapID, stepId) {
  return request({
    url: '/api/project/survey/SetSurveyListUnDone',
    method: 'get',
    params: {
      surveyListMapID, stepId
    }
  })
}

export function CheckSurveyName(prjId, step, name) {
  return request({
    url: '/api/project/survey/CheckSurveyName',
    method: 'get',
    params: {
      prjId, step, name
    }
  })
}

export function ImportBeforeSurveyList(prjId, step) {
  return request({
    url: '/api/project/survey/ImportBeforeSurveyList',
    method: 'get',
    params: {
      prjId, step
    }
  })
}
export function ImportAfootSurveyList(prjId) {
  return request({
    url: '/api/project/survey/ImportAfootSurveyList',
    method: 'get',
    params: {
      prjId
    }
  })
}
export function RemoveSurveyStep(surveyId, step) {
  return request({
    url: '/api/project/survey/RemoveSurveyStep',
    method: 'get',
    params: {
      surveyId, step
    }
  })
}

export function GetSurveyModifys(stepId, prjId, pageIndex, pageSize, name) {
  return request({
    url: '/api/project/survey/GetSurveyModifys',
    method: 'get',
    params: {
      stepId, prjId, pageIndex, pageSize, name
    }
  })
}
export function GetSurveyModifyCount(stepId, prjId) {
  return request({
    url: '/api/project/survey/GetSurveyModifyCount',
    method: 'get',
    params: {
      stepId, prjId
    }
  })
}
export function DeleteSurveyImage(id) {
  return request({
    url: '/api/project/Survey/DeleteSurveyImage',
    method: 'get',
    params: {
      id
    }
  })
}

export function GetDSFile() {
  return request({
    url: '/api/ShowData/GetDSFile',
    method: 'get',
  })
}

export function DeleteAll(prjId) {
  return request({
    url: '/api/Survey/DeleteAll',
    method: 'get',
    params: {
      prjId
    }
  })
}

export function SetSurveyStep(data) {
  return request({
    url: '/api/Survey/SetSurveyStep',
    method: 'post',
    data
  })
}


export function AddSurveyOpUser(data) {
  return request({
    url: '/api/Survey/AddSurveyOpUser',
    method: 'post',
    data
  })
}
export function GetSurveyOpUser(prjId) {
  return request({
    url: '/api/Survey/GetSurveyOpUser',
    method: 'get',
    params: {
      prjId
    }
  })
}



export function GetDirectoryTree(path) {
  return request({
    url: '/api/Survey/GetDirectoryTree',
    method: 'get',
    params: {
      path
    }
  })
}
export function GetSurveyImageCache() {
  return request({
    url: '/api/Survey/GetSurveyImageCache',
    method: 'get',
  })
}
export function ImportCacheImage(id) {
  return request({
    url: '/api/Survey/ImportCacheImage',
    method: 'get',
    params: {
      id
    }
  })
}
export function DeleteCacheImage(id) {
  return request({
    url: '/api/Survey/DeleteCacheImage',
    method: 'get',
    params: {
      id
    }
  })
}
export function GetDirectoryFile(path) {
  return request({
    url: '/api/Survey/GetDirectoryFile',
    method: 'get',
    params: {
      path
    }
  })
}
export function ChangeDirectoryName(path, name) {
  return request({
    url: '/api/Survey/ChangeDirectoryName',
    method: 'get',
    params: {
      path,
      name
    }
  })
}
export function ChangeFileName(path, name) {
  return request({
    url: '/api/Survey/ChangeFileName',
    method: 'get',
    params: {
      path,
      name
    }
  })
}
export function DeleteSurveyOpUser(userId, prjId) {
  return request({
    url: '/api/Survey/DeleteSurveyOpUser',
    method: 'get',
    params: {
      userId,
      prjId
    }
  })
}

export function getUnCommitSurvey() {
  return request({
    url: '/api/Project/Survey/GetUnCommitSurvey',
    method: 'get',
  })
}

export function getUnAuditSurvey(prjId) {
  return request({
    url: '/api/Project/Survey/GetUnAuditSurvey',
    method: 'get',
    params: {
      prjId
    }
  })
}